/*
 * @Author: Devin
 * @Date: 2022-03-31 18:10:19
 * @LastEditors: Devin
 * @LastEditTime: 2022-04-01 16:56:40
 */
export default {
  code:`<pre class="language-markup" contenteditable="false"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>CcButton</span> <span class="token attr-name">@click</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>showMessageFun(<span class="token punctuation">'</span>仅会显示一个<span class="token punctuation">'</span>)<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span>仅会显示一个<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>CcButton</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>CcButton</span> <span class="token attr-name">@click</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>showMessageFun(<span class="token punctuation">'</span>显示任意条数2<span class="token punctuation">'</span>, 2)<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span>显示任意条数：2条<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>CcButton</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>CcButton</span> <span class="token attr-name">@click</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>showMessageFun(<span class="token punctuation">'</span>显示任意条数3<span class="token punctuation">'</span>, 3)<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span>显示任意条数：3条<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>CcButton</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>CcButton</span> <span class="token attr-name">@click</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>showMessageFun(<span class="token punctuation">'</span>显示任意条数4<span class="token punctuation">'</span>, 4)<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span>显示任意条数：4条<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>CcButton</span><span class="token punctuation">&gt;</span></span></pre>
<pre class=" language-javascript" contenteditable="false" data-mce-selected="1"><span class="token operator">&lt;</span>script lang<span class="token operator">=</span><span class="token string">"ts"</span><span class="token operator">&gt;</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> ccMessage <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@/components/packages/cc-message'</span><span class="token punctuation">;</span>
<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
  <span class="token function">setup</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">const</span> showMessageFun <span class="token operator">=</span> <span class="token punctuation">(</span>str<span class="token operator">:</span> string<span class="token punctuation">,</span> number<span class="token operator">:</span> number <span class="token operator">=</span> <span class="token number">1</span><span class="token punctuation">)</span><span class="token operator">:</span> <span class="token parameter"><span class="token keyword">void</span></span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
      ccMessage<span class="token punctuation">.</span><span class="token function">success</span><span class="token punctuation">(</span><span class="token punctuation">{</span> message<span class="token operator">:</span> str<span class="token punctuation">,</span> number <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> <span class="token punctuation">{</span> showMessageFun <span class="token punctuation">}</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>script<span class="token operator">&gt;</span></pre>`,
code1:`<pre class="language-markup" contenteditable="false"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>CcButton</span> <span class="token attr-name">@click</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>showMessageBaseFun(<span class="token punctuation">'</span>简化写法<span class="token punctuation">'</span>)<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span>简化写法<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>CcButton</span><span class="token punctuation">&gt;</span></span></pre><pre class=" language-javascript" contenteditable="false" data-mce-selected="1"><span class="token operator">&lt;</span>script lang<span class="token operator">=</span><span class="token string">"ts"</span><span class="token operator">&gt;</span>
<span class="token keyword">import</span> <span class="token punctuation">{</span> ccMessage <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'@/components/packages/cc-message'</span><span class="token punctuation">;</span>
<span class="token keyword">export</span> <span class="token keyword">default</span> <span class="token punctuation">{</span>
  <span class="token function">setup</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">const</span> showMessageBaseFun <span class="token operator">=</span> <span class="token punctuation">(</span>str<span class="token operator">:</span> string<span class="token punctuation">)</span><span class="token operator">:</span> <span class="token parameter"><span class="token keyword">void</span></span> <span class="token operator">=&gt;</span> <span class="token punctuation">{</span>
      ccMessage<span class="token punctuation">.</span><span class="token function">success</span><span class="token punctuation">(</span>str<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">;</span>
    <span class="token keyword">return</span> <span class="token punctuation">{</span> showMessageBaseFun <span class="token punctuation">}</span><span class="token punctuation">;</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>
<span class="token operator">&lt;</span><span class="token operator">/</span>script<span class="token operator">&gt;</span></pre>`
}